package dao.entity;

import org.hibernate.criterion.Restrictions;

import model.entity.role.Users;
import dao.AbstractDAO;

public class UserDAO extends AbstractDAO<Users, Integer>{

	public UserDAO() {
		super(Users.class);
	}

	public Users checkLogin(String username, String pass) {
		return findByCriteria(Restrictions.and(Restrictions.like("username", username),Restrictions.like("pass", pass))).get(0);
	}
	
}
